import request from '../../utils/request'
const api_name = "book"

/**分页查询书籍列表 */
export function getBookListByCondition(queryCondition) {
    return request({
        url: `/${api_name}/booklistBK`,
        method: 'post',
        data: queryCondition
    })
}

/**查询书籍详情 */
export function getBookDetail(id) {
    return request({
        url: `/${api_name}/bookdetail/${id}`,
        method: 'get'
    })
}

/**删除书籍 */
export function removeBook(id) {
    return request({
        url: `/${api_name}/remove/${id}`,
        method: 'DELETE'
    })
}

/**添加书籍 */
export function addBook(bookinfo) {
    return request({
        url: `/${api_name}/add`,
        method: 'POST',
        data:bookinfo
    })
}

/**修改书籍 */
export function editBook(bookinfo) {
    return request({
        url: `/${api_name}/edit`,
        method: 'PUT',
        data:bookinfo
    })
}